/*
package com.chen.service.Impl;

import com.chen.service.SpeakService;
import com.iflytek.cloud.speech.*;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.swing.*;

@Service("SpeakServiceImpl")
public class SpeakServiceImpl extends JPanel implements SpeakService {


   */
/* private SpeechSynthesizer mTts;

    //当前要显示的文本
    private String mCurText = "xiaoyan";

    @PostConstruct
    public void init() {
        SpeechUtility.createUtility("appid=a6163ca3");
    }

    public void Speak(String string) {
        mTts = SpeechSynthesizer.createSynthesizer();
        mTts.setParameter(SpeechConstant.VOICE_NAME,string);
        //mTts.setParameter(SpeechConstant.VOLUME,"5");
        mTts.startSpeaking(string, mSynListener);
    }


    private SynthesizerListener mSynListener = new SynthesizerListener() {
        @Override
        public void onBufferProgress(int i, int i1, int i2, String s) {
        }

        @Override
        public void onSpeakBegin() {

        }

        @Override
        public void onSpeakProgress(int i, int i1, int i2) {
        }

        @Override
        public void onSpeakPaused() {
        }

        @Override
        public void onSpeakResumed() {

        }

        @Override
        public void onCompleted(SpeechError speechError) {
        }

        @Override
        public void onEvent(int i, int i1, int i2, int i3, Object o, Object o1) {
        }
    };

    @Override
    public void stop() {
        mTts.stopSpeaking();
    }*//*

}
*/
